<!--一个组件多用，添加/编辑弹窗-->
<template>
    <div class="mycontainer">
        <el-form ref="form" :model="form" label-width="80px">
            <el-form-item label="活动名称">
                <el-input v-model="form.ename"></el-input>
            </el-form-item>
            <el-form-item label="工资岗位">
                <el-select v-model="form.job" placeholder="请选择活动区域">
                    <el-option label="区域一" value="shanghai"></el-option>
                    <el-option label="区域二" value="beijing"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="上级领导">
                <el-input v-model="form.mgr"></el-input>
            </el-form-item>
            <el-form-item label="入职日期">
                <el-col :span="11">
                    <el-date-picker type="date" placeholder="选择日期" value-format="yyyy-MM-dd" v-model="form.hiredate" style="width: 100%;"></el-date-picker>
                </el-col>
                <el-col class="line" :span="2">-</el-col>
            </el-form-item>
            <el-form-item label="工资">
                <el-input v-model="form.sal"></el-input>
            </el-form-item>
            <el-form-item label="奖金">
                <el-input v-model="form.comm"></el-input>
            </el-form-item>
            <el-form-item label="部门编号">
                <el-input v-model="form.deptno"></el-input>
            </el-form-item>
        </el-form>
    </div>
</template>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>

<script>
    export default {
        name: '',
        components: {},
        data() {
            return {
                form: {
                    name: '',
                    region: '',
                    date1: '',
                    date2: '',
                    isAdvertise:'',
                    delivery: false,
                    type: [],
                    resource: '',
                    desc: ''
                }
            }
        },
        methods: {
            dataInit(data){
                if(data){
                    this.form = data;
                    console.info(data);
                }
            },
            /*onSubmit(){
                //需要提交的form表单
                var form = this.$refs.popWindow.form;
                if (this.addOperate) {
                    console.log(111)
                }else{
                    //axious 编辑修改
                }
            },
*/
        },
    }
</script>
<style>
    .mycontainer {
        display: flex;
        flex-direction: column;
        justify-content: space-around
    }
</style>